

const login = {
  state :{

    currentUser:{},
    loginflag:false,
    token:"",


  },

  mutations: {
    /* setCollapsed (state) {
       return state.collapsed = !state.collapsed;
     },*/


    setCurrentUser(state,data){
      state.currentUser = data
    },
    setloginflag(state,data){
      state.loginflag = data
    },
    setToken(state,data){
      state.token=data
    },


  },
  actions: {
    /*setCollapsed ({ commit }) {
      commit("setCollapsed");
    }*/
    setloginflag({commit},data){
      commit('setloginflag',data)
    },
    setToken({commit},data){
      commit('setToken',data)
    },
    setCurrentUser({commit},data){
      commit('setCurrentUser',data)
    },

  }


}
export default login;
